package net.similarsu.device.sdk.dah.struct;

import com.sun.jna.Pointer;
import com.sun.jna.Structure;

import static net.similarsu.device.sdk.dah.library.DahLibrary.MAX_LOG_PATH_LEN;

@Structure.FieldOrder({
        "dwSize"
        ,"bSetFilePath"
        ,"szLogFilePath"
        ,"bSetFileSize"
        ,"nFileSize"
        ,"bSetFileNum"
        ,"nFileNum"
        ,"bSetPrintStrategy"
        ,"nPrintStrategy"
})
public class LOG_SET_PRINT_INFO extends Structure {
    public int dwSize;
    public int bSetFilePath;                           // 是否重设日志路径
    public byte[] szLogFilePath = new byte[MAX_LOG_PATH_LEN];        // 日志路径(默认"./sdk_log/sdk_log.log")
    public int bSetFileSize;                           // 是否重设日志文件大小
    public int nFileSize;                              // 每个日志文件的大小(默认大小10240), 单位:KB
    public int bSetFileNum;                            // 是否重设日志文件个数
    public int nFileNum;                               // 绕接日志文件个数(默认大小10)
    public int bSetPrintStrategy;                      // 是否重设日志打印输出策略
    public int nPrintStrategy;                         // 日志输出策略, 0:输出到文件(默认); 1:输出到窗口

    public LOG_SET_PRINT_INFO() {
        super();
    }

    public LOG_SET_PRINT_INFO(Pointer pointer) {
        super(pointer);
    }

    public static class ByReference extends LOG_SET_PRINT_INFO implements Structure.ByReference {
    }


    public static class ByValue extends LOG_SET_PRINT_INFO implements Structure.ByValue {
    }
}
